<?php
/**
 * CreateTime: 2023/1/9 11:04
 */

namespace App\Models\MeClient;

use App\Consts\TableConsts\TableConsts;
use App\Models\BaseModelV2;


class MeClientModel extends BaseModelV2
{
    protected $table = TableConsts::ME_CLIENT;

    protected $primaryKey = 'client_id';

    protected $fillable = [
        'client_id',
        'client_name',
        'client_contacts',
        'client_type',
        'created_at',
        'updated_at',
        'status',
        'owner_id',
        'client_import_count'
    ];

    public function getByName($name,$select = ["*"]){
        return $this->select($select)->where('client_name',$name)->first();
    }


}